#ifndef BSP_USART_H
#define BSP_USART_H

#ifdef cplusplus
 extern "C" {
#endif

#include <stdint.h>
#include "gd32f10x.h"

#define USART0_RX_DATA_LEN  512
#define USART0_TX_DATA_LEN  512
extern uint8_t usart0_RxBuffer[USART0_RX_DATA_LEN];
extern uint8_t usart0_TxBuffer[USART0_TX_DATA_LEN];

extern uint16_t usart1_dmarx_len;
/* configure the USART peripheral */
void bsp_usart0_init(void);
void send_data_dma_u0(uint8_t data[], uint8_t num);
void u0_printf(char* fmt,...);

#endif
